#!/usr/bin/env bash
#
# author: feihai
#* 
# 通用方法
#*

# Usage：yn "a question xxxx? [y/n] ?"
yn() {
    read -rn 1 -p "$1 [y/n]: "
    printf '\n'
}
# 提示错误并推出
# Usage：die "参数错误"
err() {
    printf 'error: %s\n' "$1" >&2
    exit 1
}
